local hx__dianhun = fk.CreateSkill {
  name = "hx__dianhun",
}


hx__dianhun:addEffect(fk.CardEffectCancelledOut, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(hx__dianhun.name) then
      return data.card and data.from and data.to and not data.card.multiple_targets
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local card = Fk:cloneCard(data.card.name, data.card.suit, data.card.number)
    card.skillName = hx__dianhun.name
    local use = {
      from = data.to,
      card = card,
      tos = {data.from},
    }
    room:useCard(use)
  end,
})


return hx__dianhun
